# Copyright 2024 Ant Group Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("@yacl//bazel:yacl.bzl", "yacl_cc_library", "yacl_cc_test")

package(default_visibility = ["//visibility:public"])

test_suite(
    name = "he_util_tests",
)

yacl_cc_library(
    name = "util",
    deps = [
        ":he_assert",
        ":he_object",
        ":mp_int",
        ":spi_traits",
    ],
)

yacl_cc_library(
    name = "spi_traits",
    hdrs = ["spi_traits.h"],
    deps = [
        "@yacl//yacl/utils/spi:type_traits",
    ],
)

yacl_cc_library(
    name = "mp_int",
    hdrs = ["mp_int.h"],
    deps = [
        "@yacl//yacl/math/mpint",
        "@yacl//yacl/math/mpint:montgomery_math",
    ],
)

yacl_cc_library(
    name = "he_object",
    hdrs = ["he_object.h"],
    deps = [
        "@yacl//yacl/base:buffer",
        "@yacl//yacl/base:byte_container_view",
    ],
)

yacl_cc_library(
    name = "he_assert",
    hdrs = ["he_assert.h"],
    deps = ["@yacl//yacl/base:exception"],
)
